
{% block pagination %}

{% if pager.first != pager.last %}
<div class="pagination">
    <ul>
        <li {% if pager.first == pager.current %}class="disabled"{% endif %}>
            <a href="?page={{ pager.first }}{{ pager.append }}">«</a>
        </li>
        {% for pg in pager.pages %}
            <li {% if pg == pager.current %}class="active" {% endif %}>
                <a href="?page={{ pg }}{{ pager.append }}">{{ pg + 1 }}</a></li>
        {% endfor %}
        <li {% if pager.last == pager.current %}class="disabled"{% endif %}>
            <a href="?page={{ pager.last }}{{ pager.append }}">»</a>
        </li>
    </ul>
</div>
{% endif %}

{% endblock %}


{% block alert %}

    {% if alert %}
        <div class="alert alert-{{ alert.type }}" style="position: absolute;z-index: 100;left: 9%;right: 9%;">
            <a class="close" data-dismiss="alert" href="#">&times;</a>
            <div>{{ alert.message }}</div>
        </div>
    {% endif %}

{% endblock %}


{% block teaserlogin %}
        {% if not user.isLoggedIn %}
                <a href="#login" class="btn btn-primary btn-login btn-large">
                    <i class="icon-user icon-white"></i> {% trans "Login / Sign Up" %}
                </a>
                <a href="/chart/create" class="btn btn-login btn-large">
                    <i class="icon-pencil"></i> {% trans "Try it now!" %}
                </a>
        {% else %}
                <a href="/chart/create" class="btn-primary btn btn-large"><i class="fa fa-plus"></i> {% trans "Create a Chart" %}</a>
                <a href="/mycharts" class="btn btn-large"><i class="fa fa-bar-chart-o"></i> {% trans "My Charts" %}</a>
        {% endif %}
{% endblock %}

{% block chart_head %}
    <h1 {% if not title %}class="hidden"{% endif %}>
        <span class="chart-title">{{ title|purify }}</span>
    </h1>
    <p class="chart-intro{% if not intro %} hidden{% endif %}">{{ intro|purify|raw }}</p>
{% endblock %}

